﻿using System.Collections.Generic;
using System.Data.Linq.Mapping;

namespace DataModel.DataModelContext
{
    [Table]
    public class TblLesson
    {
        public TblLesson() { }
        [Column(CanBeNull = false, IsPrimaryKey = true,IsDbGenerated = true)]
        public int Stt { get; set; }

        [Column(CanBeNull = true)]
        public string Image { get; set; }

        [Column(CanBeNull = true)]
        public string Title { get; set; }

        [Column(CanBeNull = true)]
        public List<LessonContent> ListContent { get; set; }

        [Column(CanBeNull = true)]
        public string KindOfLesson { get; set; }

        [Column(CanBeNull = true)]
        public double PerCentDone { get; set; }
    }

    public class LessonContent
    {
        string item;
        int triedTime;
        int correctedTime;

        public LessonContent(string item)
        {
            this.Item = item;
        }

        public string Item
        {
            get { return item; }
            set { item = value; }
        }

        public int TriedTime
        {
            get { return triedTime; }
            set { triedTime = value; }
        }

        public int CorrectedTime
        {
            get { return correctedTime; }
            set { correctedTime = value; }
        }

    }
}
